<?php

use App\CompanyApi\Controllers\AuthController;
use App\CompanyApi\Controllers\JobpositionController;
use Illuminate\Support\Facades\Route;

//验证码登录
Route::post('mobile-login', [AuthController::class, 'mobileLogin']);
//手机号登录
Route::post('login', [AuthController::class, 'login']);
//获取验证码
Route::post('verify-code', [AuthController::class, 'mobileVerifyCode']);
//图形验证码
Route::get('captcha', [AuthController::class, 'getCaptchaApi']);
//获取用户信息
Route::middleware(['auth:company-api'])->group(function () {
    //用户信息
    Route::get('me', [AuthController::class, 'me']);
    // 退出登陆
    Route::post('logout', [AuthController::class, 'logout']);
    //职位列表
    Route::get('jobposition', [JobpositionController::class, 'list']);
    //职位详情
    Route::get('jobposition/{id}', [JobpositionController::class, 'detail']);
    //统计
    Route::get('jobposition-statistics', [JobpositionController::class, 'statistics']);
    //创建职位
    Route::post('jobposition', [JobpositionController::class, 'store']);
});